package org.apache.lucene.search;

import com.google.appengine.api.datastore.Key;

/**
 * Class for for storing the Datastore key associated
 * to a document in the TopDoc result.
 * 
 * @author Joel Wilson
 *
 */
public class KeyScoreDoc extends ScoreDoc {

	private static final long serialVersionUID = 1L;
	
	public final String key;
	
	public KeyScoreDoc(int doc, float score, String key) {
		super(doc, score);
		this.key = key;
	}
	
	public KeyScoreDoc(ScoreDoc doc, String key) {
		super(doc.doc, doc.score);
		this.key = key;
	}

	@Override
	public String toString() {
		return "key=" + key + ", doc=" + doc + ", score=" + score;
	}
	
}
